<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">


    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>不关机的云端电脑</title>
    <link rel="icon" type="image/x-icon" mce_href="/favicon.ico" href="image/favicon.ico">
    <link rel="stylesheet" href="css/bootstrap.css">
    <link rel="stylesheet" href="css/bootstrap-docs.min.css">
    <!--[if lt IE 8]>
    <link rel="stylesheet" href="css/bootstrap-ie7.css">
    <![endif]-->



    <script src="js/jquery.min.js"></script>
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>

    <![endif]-->
    <script src="js/bootstrap.js" type="text/javascript"></script>



  <script type="text/javascript">
      /**
       * 处理登陆事件
       */
      function validate() {

          if ($("#account").val() == "") {
              alert("请填写您的登陆邮箱");
              $("#account").focus();
              return false;
          }
          if ($("#password").val() == "") {
              alert("请填写您的登陆密码");
              $("#password").focus();
              return false;
          }
          return true;
      }
      $(document).ready(function () {

          $("#loginForm").submit(function (event) {
              event.preventDefault() ;
              event.stopPropagation();

              if(!validate()){
                  return false;
              }

              var url = "/doLogin"; // the script where you handle the form input.
              $.ajax({
                  type: "POST",
                  url: url,
                  data: $("#loginForm").serialize(), // serializes the form's elements.
                  success: function (data) {
                      if(data.succ){
                          window.location.href = '/';
                      }else{
                          alert(data.msg);
                      }
                  }
              });

              return false; // avoid to execute the actual submit of the form.
          });
      });
  </script>

</head>

<body data-spy="scroll" data-target="#myScrollspy">

<div>
    <nav class="navbar-l1 navbar-default navbar-static-top" role="navigation"
         style="background-color:#008eb7;min-height:80px;">
        <div class="container-fluid">
            <%--<div class="navbar-header">--%>
                <%--<a class="navbar-brand" href="./GuaJiBaoLogin_files/GuaJiBaoLogin.html"><img--%>
                        <%--src="image/50-258-white.png" alt="guajibao_logo" title="guajibao_logo"></a>--%>
            <%--</div>--%>
            <div class="collapse navbar-collapse" id="bs-navbar-collapse-1">
                <ul class="nav navbar-nav navbar-right btn">
                    <li sy><a style="display: none" target="_blank"
                              href="http://wpa.qq.com/msgrd?v=3&uin=2458726121&site=qq&menu=yes"><img
                            border="0" src="image/q20-20.png" alt="点击这里给我发消息" title="点击这里给我发消息">联系官方客服</a></li>
                </ul>
            </div>
        </div>
    </nav>
    <div class="row">
        <div class="col-md-offset-1 col-md-10 jumbotron">
            <div id="welcome" class="col-md-8 hidden-xs">
                <h1>永不关机的“云端”电脑</h1>

                <p style="margin-top:30px;"><span class="glyphicon glyphicon-ok"></span> 云计算技术，更稳定、不重启，比谁谁在线时间更长</p>

                <p><span class="glyphicon glyphicon-ok"></span> 完全独立云主机、网络隔离，像家里一样安全</p>

                <p><span class="glyphicon glyphicon-ok"></span> 2分钟自动开通，按需使用，想用就用</p>

                <p><span class="glyphicon glyphicon-ok"></span> 比电费还便宜，让你变身24小时在线的神器哦</p>
            </div>
            <form role="form" id="loginForm" name="loginForm" method="post" >
                <div id="login" class="col-md-4" style="background-color:#fff;padding:20px;">
                    <div class="form-group">
                    </div>
                    <div class="form-group">
                        <label for="account">注册邮箱：</label>
                        <input type="email" class="form-control" placeholder="请输入注册邮箱" name="account" id="account"
                               value="" maxlength="50">
                    </div>
                    <div class="form-group">
                        <label for="password">密码：</label>
                        <input type="password" name="password" id="password" maxlength="20" class="form-control"
                               placeholder="请输入密码">
                    </div>
                    <div class="form-group">
                        <label> </label>

                        <div class="input-group">


                        </div>
                    </div>
                    <div class="row form-group" style="margin-top:20px;">
                        <div class="col-md-6">

                            <input type="submit" class="btn btn-primary btn-block" value="登陆">
                        </div>
                        <div class="col-md-6">
                            <a class="btn btn-default btn-block" href="/register">注册新账户
                            </a>
                        </div>
                    </div>
                    <div style="height:1px;margin:0px auto;padding:0px;background-color:#D5D5D5;overflow:hidden;"></div>

                </div>
            </form>
        </div>
    </div>



<script type="text/javascript">
    if (window.ActiveXObject) {
        var ua = navigator.userAgent.toLowerCase();
        var ie = ua.match(/msie ([\d.]+)/)[1]
        if (ie == 6.0) {
            alert("您的浏览器版本过低，无法正常使用新版zhekou.com系统，请先升级浏览器版本！");
        }
    }
</script>


</body>
</html>